 pptp
"""""""""""""
       pptp ,       .

       . .       .


  pptp???!?!
pptp:
PPTP - Point to Point Tunneling Protocol 
   , /    . tcp/ip connection
      isp  , ()     .

         
(ctrl+shift left)

GRE  :::  Generic Encapsulation Protocol + some Microsoft crap added.

PPP  :::  Point to Point Protocol , with no changes.

PPTP :::  The transport protocol . uses GRE for data transfer via PPP
          so it goes like VPN tunnel .
           
CHAP :::  Authorization protocol ( PPP CHAP + MS CHAP ext )
 
MPPE :::  Microsoft  Point  to  Point  Encryption - enabled by default
          between PPP and GRE . ( you can disable it )

     :
                  .
      (pptp) ""(tunnel)      (ppp).   (VIa)
ms-chap     (ppp) ,   .

     (  ,   ,ctrl+shift ).:

PPTP+GRE : PPTP establishes connection through TCP to 5678 , or 1723 port .
           Control connection doesnt need identification at all . this is
           great for us because we can make fake connections .
           
           Then goes pre connection , that is controled by PPTP.
           This is how a contol connection looks like :
           
           PPTP_START_SESSION_REQUEST       start of session
           PPTP_START_SESSION_REPLY         server agreed
           PPTP_ECHO_REQUEST                this one is clear
           PPTP_ECHO_REPLY                  this is too
           PPTP_WAN_ERROR_NOTIFY            error notification
           PPTP_SET_LINK_INFO               configuration packet
           PPTP_STOP_SESSION_REQUEST        disconnect request
           PPTP_STOP_SESSION_REPLY          disconnect agreement

           Control messages sent inside TCP datagram  .
           This is how a packet looks from the inside :
           
                       +-----------------------+
                       |PPP Delivery Header    |
                       +-----------------------+
                       |IP Header              |
                       +-----------------------+
                       |PPTP Control Message   |
                       +-----------------------+
                       |Trailers               |
                       +-----------------------+
                       |PPTP Data Transmission |
                       +-----------------------+
                       
                       
          After creating a connection, Client and Server exchange
          pptp transport packets . This packets also include pptp 
          packets, They sent like IP datagrams, processed by GRE:
          
                       +-----------------------+
                       |PPP Delivery Header    |
                       +-----------------------+
                       |IP Header              |
                       +-----------------------+
                       |GRE Header             |
                       +-----------------------+
                       |PPP Header             |
                       +-----------------------+
                       |IP Header              |
                       +-----------------------+
                       |TCP Header             |
                       +-----------------------+
                       |Data                   |
                       +-----------------------+

(  ctrl+shift ).
Authorization an encription protocol. realized in PPTP + MSCHAP v2.
  MPPE     Version 1.0 also used in old PPTP's looked like this

(  ctrl+shift ).
    ,   8   , "  .
          DES, -3  -24   (bit paket),   .
   3   NT hashes    .

    V.2 /.

    .   16  ,   16  (   Peer Authenticator Challenge)
   hashe   .(pac)
   24    NT Hashe .
  :(ctrl+shift  .)
client
also creates 24-bits answer by NT hashe and 8-bit hashe from  the
prev step.  
Then Client sends First and Third hashe to the Server
And now Server unpacks hashed packet and checks compares with the
original challenge.
Server uses PAC and hashed passwd to generate 
Authenticator Response .  Client cheks this AR and the connection 

(ctrl+shift right)

 ...
       .
     .
       ,      .
      ,
           d4rk knight